﻿using Microsoft.AspNetCore.Mvc.Filters;

namespace CommonUtils
{
    /// <summary>
    /// services.AddMvc(options => options.Filters.Add<ResourceFilter>());
    /// </summary>
    public class ResourceFilter : IResourceFilter
    {
        public void OnResourceExecuted(ResourceExecutedContext context)
        {

        }

        public void OnResourceExecuting(ResourceExecutingContext context)
        {
            LogUtil.PrintInfo("Resource request:{0}", context.HttpContext.Request.Path);
        }
    }
}
